<template>
  <div class="login-container">
    <!-- <div style="margin-right: 150px; min-width: 300px">
        <img alt="" src="../../public/login_Team.png" style="width: 600px"/>
    </div> -->
    <div style="width: 400px; margin: 150px auto">
      <div style="color: black; font-size: 30px; text-align: center; padding: 30px 0">欢迎登录西科学生宿舍系统</div>
      <el-form ref="form" :model="form" :rules="rules" size="large">
        <el-form-item prop="username">
          <el-input v-model="form.username" clearable prefix-icon="avatar" placeholder="请输入用户名"></el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input v-model="form.password" prefix-icon="lock" show-password placeholder="请输入密码"></el-input>
        </el-form-item>
        <el-form-item prop="identity">
          <el-select v-model="form.identity"  placeholder="请选择身份">
            <el-option label="学生" value="stu"></el-option>
            <el-option label="宿舍管理员" value="dormManager"></el-option>
            <el-option label="超级管理员" value="admin"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button :disabled="!disabled" style="width: 100%" type="primary" @click="login">登 录</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
  <div class="footer">
    ©Copyright 1952-2024 西南科技大学 开拓团队 版权所有
    <div>
      Vue.js 3.0 + SpringBoot 2.* + MyBatis 3.4.6 + MySQL 8.0.40
    </div>
  </div>
</template>
<script src="@/assets/js/Login.js"></script>
<style scoped>
.login-container {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(
      135deg,
      hsl(170deg, 80%, 70%),
      hsl(190deg, 80%, 70%),
      hsl(250deg, 80%, 70%),
      hsl(320deg, 80%, 70%),
      hsl(320deg, 80%, 70%),
      hsl(250deg, 80%, 70%),
      hsl(190deg, 80%, 70%),
      hsl(190deg, 80%, 70%),
      hsl(170deg, 80%, 70%)
  );
  background-size: 600%;
  animation: myanimation 15s linear infinite;
}

@keyframes myanimation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  }
}

.footer {
  left: 0;
  bottom: 0;
  color: #fff;
  width: 100%;
  position: fixed;
  text-align: center;
  line-height: 30px;
  padding-bottom: 10px;
  text-shadow: #000 0.1em 0.1em 0.1em;
  font-size: 14px;
  margin-bottom: 40px;
}

.footer a,
.footer span {
  color: #fff;
}
</style>
